package com.ruoyi.system.enums;


import lombok.Getter;

/**
 * 业务类型枚举
 */
@Getter
public enum BusinessTypeEnum {

    DESIGN("DESIGN", "图纸设计"),
    DESIGN_DATA_CHANGE("DESIGN_DATA_CHANGE", "图纸数据变更"),
    DESIGN_TODO("DESIGN_TODO", "设计待办"),
    ORDER("ORDER", "订单管理"),
    USER("USER", "用户管理"),
    CONFIG("CONFIG", "系统配置");

    private final String code;
    private final String desc;

    BusinessTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static BusinessTypeEnum getByCode(String code) {
        for (BusinessTypeEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
}
